//
//  LeaveMessageViewController.m
//  LvZhi201805
//
//  Created by 付明玉 on 2018/5/17.
//  Copyright © 2018年 付明玉. All rights reserved.
//

#import "LeaveMessageViewController.h"

@interface LeaveMessageViewController ()

@end

@implementation LeaveMessageViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    //背景色
    self.view.backgroundColor = COLOR(251, 251, 251, 1);
    
    //输入框
    self.leaveMessageTextView = [[UITextView alloc] init];
    [self.view addSubview:self.leaveMessageTextView];
    [self.leaveMessageTextView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(self.view.mas_left).offset(8);
        make.right.mas_equalTo(self.view.mas_right).offset(8);
        make.top.mas_equalTo(self.view.mas_top).offset(86);
        make.height.mas_equalTo(119);
    }];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
    //显示导航栏
    self.navigationController.navigationBarHidden = NO;
    
    //标题
    self.navigationItem.title = @"留言";
    
    //背景色
    [self.navigationController.navigationBar setBarTintColor:COLOR(18, 79, 151, 1)];
    
    //字体颜色
    self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
    
    //设置返回按钮颜色
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    
    //字体
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName, [UIFont fontWithName:@"AmericanTypewriter-Bold" size:18], NSFontAttributeName, nil]];
    
    //提交按钮
    self.commitButton = [[UIButton alloc] init];
    [self.view addSubview:self.commitButton];
    [self.commitButton mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(self.view.mas_left).offset(18);
        make.right.mas_equalTo(self.view.mas_right).offset(-18);
        make.top.mas_equalTo(self.leaveMessageTextView.mas_bottom).offset(23);
        make.height.mas_equalTo(45);
    }];
    self.commitButton.backgroundColor = COLOR(18, 79, 151, 1);
    [self.commitButton setTitle:@"提交" forState:UIControlStateNormal];
    self.commitButton.layer.cornerRadius = 3;
    [self.commitButton addTarget:self action:@selector(clickCommitButton) forControlEvents:UIControlEventTouchUpInside];
}

#pragma mark - 点击提交按钮
- (void)clickCommitButton
{
    
}

@end
